public class java3_12 {
    public static void main(String[] args) {
        int [] array = {1,2,3,4,5,6};
        for (int x: array){
            System.out.print(x+" ");
        }
        System.out.println("\n====================");
        sortOdd(array);
        for (int x: array){
            System.out.print(x+" ");
        }
    }
    public static void sortOdd(int [] a){
        int start = 0;
        int end = a.length-1;
        int i = a.length/2;
        while (i != 0){
            if(a[start] % 2 ==0 ){
                int tem = a[start];
               a[start] = a[end];
                a[end] = tem;

            }
            start++;
            end--;
            i--;
        }
    }
}
